/*  
	------------------------------------------------------------------------
	 NQ Core Library
	
	 Homepage: http://www.awzhome.de/
	------------------------------------------------------------------------
	
	This Source Code Form is subject to the terms of the Mozilla Public
	License, v. 2.0. If a copy of the MPL was not distributed with this
	file, You can obtain one at http://mozilla.org/MPL/2.0/.
   
	The Original Code is code of NQ Core Library.

	The Initial Developer of the Original Code is Andreas Weizel.
	Portions created by the Initial Developer are
	Copyright (C) 2012 Andreas Weizel. All Rights Reserved.
	
	Contributor(s): (none)
	
	------------------------------------------------------------------------
*/

namespace AWZhome.NQ.Core
{
	/// <summary>
	/// Interface for a class that saves information about a registered service.
	/// </summary>
	public interface INQServiceInfo
	{
		/// <summary>
		/// Returns the interface registered for this service.
		/// </summary>
		System.Type ServiceInterface
		{
			get;
		}

		/// <summary>
		/// Returns the internal name of the component that has registered the service.
		/// </summary>
		string ParentComponent
		{
			get;
		}

		/// <summary>
		/// Indicates if the service is a single-instance service.
		/// </summary>
		bool SingleInstance
		{
			get;
		}

		/// <summary>
		/// Returns an array containing the registered interfaces of all services
		/// that have been substituted by this service.
		/// </summary>
		System.Type[] Substitutes
		{
			get;
		}

		/// <summary>
		/// Returns the <see cref="System.Type">Type</see> object for the component's internal implementation
		/// class for this service.
		/// </summary>
		System.Type ServiceType
		{
			get;
		}

		/// <summary>
		/// Retrieves an array of all AttachLists this service has been added to on registration.
		/// </summary>
		string[] AttachedTo
		{
			get;
		}

		/// <summary>
		/// Returns all loading requirements for the service represented by an array
		/// of <see cref="AWZhome.NQ.Core.INQComponentRequirement">INQComponentRequirement</see>
		/// objects.
		/// </summary>
		INQComponentRequirement[] Requires
		{
			get;
		}

		/// <summary>
		/// Retrieves the service category assigned to this service.
		/// </summary>
		NQHostMode ServiceCategory
		{
			get;
		}

		/// <summary>
		/// Returns an array of <see cref="System.Type">Type</see> objects for all
		/// NQ service interfaces that the service implements.
		/// </summary>
		System.Type[] InterfaceTypes
		{
			get;
		}

		/// <summary>
		/// Returns <see cref="System.Reflection.MethodInfo">MethodInfo</see> object for the InvokeService method,
		/// if the service is an invokable service.
		/// </summary>
		System.Reflection.MethodInfo InvokeMethod
		{
			get;
		}

		/// <summary>
		/// Returns <see cref="System.Reflection.MethodInfo">MethodInfo</see> object for the QuitService method,
		/// if the service is an invokable service.
		/// </summary>
		System.Reflection.MethodInfo QuitMethod
		{
			get;
		}

		/// <summary>
		/// Determines if the service defines InvokeService or QuitService methods through
		/// <see cref="AWZhome.NQ.Core.NQServiceInvokeMethodAttribute">NQServiceInvokeMethodAttribute</see>
		/// and <see cref="AWZhome.NQ.Core.NQServiceQuitMethodAttribute">NQServiceQuitMethodAttribute</see>
		/// or by implementing <see cref="AWZhome.NQ.Core.INQInvokableService">INQInvokableService</see>.
		/// </summary>
		bool IsInvokable
		{
			get;
		}

		/// <summary>
		/// Returns information about services or AttachLists that have to be auto-injected
		/// into instances of this service.
		/// </summary>
		INQAutoInjection[] AutoInjections
		{
			get;
		}
	}
}
